Optimal. Leaf size=110 \[ -\frac{\left (3 a^2+4 b^2\right ) \tanh ^{-1}(\cos (e+f x))}{8 f}-\frac{\left (3 a^2+4 b^2\right ) \cot (e+f x) \csc (e+f x)}{8 f}-\frac{a^2 \cot (e+f x) \csc ^3(e+f x)}{4 f}-\frac{2 a b \cot ^3(e+f x)}{3 f}-\frac{2 a b \cot (e+f x)}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0939383, antiderivative size = 110, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.238, Rules used = {2789, 3767, 3012, 3768, 3770} \[ -\frac{\left (3 a^2+4 b^2\right ) \tanh ^{-1}(\cos (e+f x))}{8 f}-\frac{\left (3 a^2+4 b^2\right ) \cot (e+f x) \csc (e+f x)}{8 f}-\frac{a^2 \cot (e+f x) \csc ^3(e+f x)}{4 f}-\frac{2 a b \cot ^3(e+f x)}{3 f}-\frac{2 a b \cot (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2789
Rule 3767
Rule 3012
Rule 3768
Rule 3770
Rubi steps
\begin{align*} \int \csc ^5(e+f x) (a+b \sin (e+f x))^2 \, dx &=(2 a b) \int \csc ^4(e+f x) \, dx+\int \csc ^5(e+f x) \left (a^2+b^2 \sin ^2(e+f x)\right ) \, dx\\ &=-\frac{a^2 \cot (e+f x) \csc ^3(e+f x)}{4 f}+\frac{1}{4} \left (3 a^2+4 b^2\right ) \int \csc ^3(e+f x) \, dx-\frac{(2 a b) \operatorname{Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (e+f x)\right )}{f}\\ &=-\frac{2 a b \cot (e+f x)}{f}-\frac{2 a b \cot ^3(e+f x)}{3 f}-\frac{\left (3 a^2+4 b^2\right ) \cot (e+f x) \csc (e+f x)}{8 f}-\frac{a^2 \cot (e+f x) \csc ^3(e+f x)}{4 f}+\frac{1}{8} \left (3 a^2+4 b^2\right ) \int \csc (e+f x) \, dx\\ &=-\frac{\left (3 a^2+4 b^2\right ) \tanh ^{-1}(\cos (e+f x))}{8 f}-\frac{2 a b \cot (e+f x)}{f}-\frac{2 a b \cot ^3(e+f x)}{3 f}-\frac{\left (3 a^2+4 b^2\right ) \cot (e+f x) \csc (e+f x)}{8 f}-\frac{a^2 \cot (e+f x) \csc ^3(e+f x)}{4 f}\\ \end{align*}
Mathematica [B] time = 0.0412662, size = 255, normalized size = 2.32 \[ -\frac{a^2 \csc ^4\left (\frac{1}{2} (e+f x)\right )}{64 f}-\frac{3 a^2 \csc ^2\left (\frac{1}{2} (e+f x)\right )}{32 f}+\frac{a^2 \sec ^4\left (\frac{1}{2} (e+f x)\right )}{64 f}+\frac{3 a^2 \sec ^2\left (\frac{1}{2} (e+f x)\right )}{32 f}+\frac{3 a^2 \log \left (\sin \left (\frac{1}{2} (e+f x)\right )\right )}{8 f}-\frac{3 a^2 \log \left (\cos \left (\frac{1}{2} (e+f x)\right )\right )}{8 f}-\frac{4 a b \cot (e+f x)}{3 f}-\frac{2 a b \cot (e+f x) \csc ^2(e+f x)}{3 f}-\frac{b^2 \csc ^2\left (\frac{1}{2} (e+f x)\right )}{8 f}+\frac{b^2 \sec ^2\left (\frac{1}{2} (e+f x)\right )}{8 f}+\frac{b^2 \log \left (\sin \left (\frac{1}{2} (e+f x)\right )\right )}{2 f}-\frac{b^2 \log \left (\cos \left (\frac{1}{2} (e+f x)\right )\right )}{2 f} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.111, size = 146, normalized size = 1.3 \begin{align*} -{\frac{{a}^{2}\cot \left ( fx+e \right ) \left ( \csc \left ( fx+e \right ) \right ) ^{3}}{4\,f}}-{\frac{3\,{a}^{2}\cot \left ( fx+e \right ) \csc \left ( fx+e \right ) }{8\,f}}+{\frac{3\,{a}^{2}\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{8\,f}}-{\frac{4\,ab\cot \left ( fx+e \right ) }{3\,f}}-{\frac{2\,ab\cot \left ( fx+e \right ) \left ( \csc \left ( fx+e \right ) \right ) ^{2}}{3\,f}}-{\frac{{b}^{2}\cot \left ( fx+e \right ) \csc \left ( fx+e \right ) }{2\,f}}+{\frac{{b}^{2}\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{2\,f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.99729, size = 198, normalized size = 1.8 \begin{align*} \frac{3 \, a^{2}{\left (\frac{2 \,{\left (3 \, \cos \left (f x + e\right )^{3} - 5 \, \cos \left (f x + e\right )\right )}}{\cos \left (f x + e\right )^{4} - 2 \, \cos \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\cos \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\cos \left (f x + e\right ) - 1\right )\right )} + 12 \, b^{2}{\left (\frac{2 \, \cos \left (f x + e\right )}{\cos \left (f x + e\right )^{2} - 1} - \log \left (\cos \left (f x + e\right ) + 1\right ) + \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - \frac{32 \,{\left (3 \, \tan \left (f x + e\right )^{2} + 1\right )} a b}{\tan \left (f x + e\right )^{3}}}{48 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.66156, size = 558, normalized size = 5.07 \begin{align*} \frac{6 \,{\left (3 \, a^{2} + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{3} - 6 \,{\left (5 \, a^{2} + 4 \, b^{2}\right )} \cos \left (f x + e\right ) - 3 \,{\left ({\left (3 \, a^{2} + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \,{\left (3 \, a^{2} + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 3 \, a^{2} + 4 \, b^{2}\right )} \log \left (\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) + 3 \,{\left ({\left (3 \, a^{2} + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \,{\left (3 \, a^{2} + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 3 \, a^{2} + 4 \, b^{2}\right )} \log \left (-\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) + 32 \,{\left (2 \, a b \cos \left (f x + e\right )^{3} - 3 \, a b \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{48 \,{\left (f \cos \left (f x + e\right )^{4} - 2 \, f \cos \left (f x + e\right )^{2} + f\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.82501, size = 311, normalized size = 2.83 \begin{align*} \frac{3 \, a^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} + 16 \, a b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 24 \, a^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 24 \, b^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 144 \, a b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 24 \,{\left (3 \, a^{2} + 4 \, b^{2}\right )} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) \right |}\right ) - \frac{150 \, a^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} + 200 \, b^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} + 144 \, a b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 24 \, a^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 24 \, b^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 16 \, a b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 3 \, a^{2}}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4}}}{192 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]